#include <stdio.h>

//https://www.nowcoder.com/practice/1f7c1d67446e4361bf4af67c08e0b8b0?tpId=290&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

int main() {
    char a = 0;
    char b = 0;
    char c = 0;
    char d = 0;
    scanf("%c%c%c%c", &a, &b, &c, &d);
    printf("%c%c%c%c", d, c, b, a);
    return 0;
}